]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
unlockDialog: Don't create AuthDialog just to finish it
authorRay Strode <rstrode@redhat.com>
Fri, 8 Oct 2021 15:08:17 +0000 (11:08 -0400)
committerRay Strode <rstrode@redhat.com>
Fri, 8 Oct 2021 15:13:11 +0000 (11:13 -0400)
If the the unlock dialog gets finished before an auth dialog is
created, the code currently creates one just to tell it to finish.

This commit changes the code to skip creating the auth dialog in
that case.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1999>

js/ui/unlockDialog.js

index 370385abc47bb9216efade9c71312e44c8891e10..f4c76c41ad91d405f6e3836f932c8df83c2bc509 100644 (file)
@@ -872,7 +872,11 @@ var UnlockDialog = GObject.registerClass({
     }
 
     finish(onComplete) {
-        this._ensureAuthPrompt();
+        if (!this._authPrompt) {
+            onComplete();
+            return;
+        }
+
         this._authPrompt.finish(onComplete);
     }